import request from '@/utils/request'
import formurlencoded from 'form-urlencoded'

// 获取每日订单统计列表
export function fetchOrderDayList(query) {
  return request({
    url: '/admin/report/orderday/list',
    method: 'get',
    params: query
  })
}

// 获取每日商品统计列表
export function fetchProductDayList(query) {
  return request({
    url: '/admin/report/productday/list',
    method: 'get',
    params: query
  })
}

// 获取订单概况
export function orderOverviewList(query) {
  return request({
    url: '/admin/report/orders/orderOverview',
    method: 'get',
    params: query
  })
}

// 获取商品浏览量-当前月日期
export function productDateNameList(query) {
  return request({
    url: '/admin/report/product/pvStatisticsJsonName',
    method: 'get',
    params: query
  })
}
// 获取商品浏览量统计数据
export function productStatisticsList(query) {
  return request({
    url: '/admin/report/product/pvStatisticsJson',
    method: 'get',
    params: query
  })
}

// 获取退货率-当前月日期
export function goodsReturnNameList(query) {
  return request({
    url: '/admin/report/orders/goodsReturnRateJsonName',
    method: 'get',
    params: query
  })
}
// 获取商品浏览量统计数据
export function goodsReturnList(query) {
  return request({
    url: '/admin/report/orders/goodsReturnRateJson',
    method: 'get',
    params: query
  })
}

// 获取客单价走势-当前月日期
export function saleOverviewNameList(query) {
  return request({
    url: '/admin/report/orders/saleOverviewJsonName',
    method: 'get',
    params: query
  })
}
// 获取客单价走势统计数据
export function saleOverviewList(query) {
  return request({
    url: '/admin/report/orders/saleOverviewJson',
    method: 'get',
    params: query
  })
}

// 获取会员增长走势-当前月日期
export function memberviewJsonNameList(query) {
  return request({
    url: '/admin/report/member/memberviewJsonName',
    method: 'get',
    params: query
  })
}
// 获取会员增长走势统计数据
export function memberviewJsonList(query) {
  return request({
    url: '/admin/report/member/memberviewJson',
    method: 'get',
    params: query
  })
}
